const Koa = require("koa");

const app = new Koa();

app.use(ctx => {
  let url = ctx.url;
  let query = ctx.query;
  ctx.body = {
    url,
    query,
  };
});

app.listen(3000, () => {
  console.log(`app is running at: http://localhost:3000`);
});
